#include <gtkmm/main.h>

#include "pulsargtk.h"

PulsarGtk::PulsarGtk(Gtk::Window* p_w,Gtk::ProgressBar* p_pb=0)
    : p_window(p_w),
      p_progressbar(p_pb)
{
}

void PulsarGtk::pulse() const
{
    p_window->show_all();
  
    while(Gtk::Main::events_pending())
        Gtk::Main::iteration();
}

void PulsarGtk::report_activity() const
{
    if(p_progressbar)
        p_progressbar->pulse();
}
